// 引入element-plus的组件
import { ElNotification,ElMessageBox } from 'element-plus'




// 提示消息
export function toast(message, type = 'success', dangerouslyUseHTML = false) {
    ElNotification({
        message,
        type,
        dangerouslyUseHTML,
        duration: 2000      // 弹框显示时间
    })
}


// 确认提示框
export function showModal(content = "提示内容", type = "warning", title = "") {
    return ElMessageBox.confirm(
        content,
        title,
        {
            confirmButtonText: '确认',
            cancelButtonText: '取消',
            type,
        }
    )
}


// 显示全屏loading
export function showFullLoading() {
    nprogress.start()
}

// 隐藏全屏loading
export function hideFullLoading() {
    nprogress.done()
}
